package com.tangsm.spring.boot.event.publisher.listener.event;

import com.tangsm.spring.boot.event.publisher.listener.domain.User;
import org.springframework.context.ApplicationEvent;

/**
 * 注册事件
 *
 * @author tangsm
 */
public class UserRegisterEvent extends ApplicationEvent {

    private static final long serialVersionUID = 7156540382591580197L;

    /**
     * 业务数据对象
     */
    private final User user;

    /**
     * 注册事件
     * @param source 谁（源对象）
     * @param user 业务参数
     */
    public UserRegisterEvent(Object source, User user) {
        super(source);
        this.user = user;
    }

    public User getUser() {
        return user;
    }
}
